<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生详情页</title>
    <style>
        #content {
            width: 600px;
            border: solid 1px #6699FF;
            margin: 50px auto;
            padding: 30px;
        }

        #left {
            float: left;
            width: 350px;
            height: 300px;
        }

        #right {
            float: left;
            width: 250px;
            height: 300px;
        }

        #bottom {
            clear: both;
            width: 600px;
           
        }

        label {
            width: 50px;
            /* display: block; */
            clear: both;
            /* float: left; */
        }

        #pic {
            width: 120px;
            /* height: 160px; */
            background: #CCC;
            padding: 10px;
        }

        #pic img {
            width: 120px;
            height: 160px;
        }

        span {
            
            color: #F96;
        }
    </style>
</head>

<body>
    <?php
    include "isLogin.php";
    include "conn.php";
    // $sql = "select * from student,major where stu_no='17010105'  and student.major_id=major.major_id";
    $stu_no = $_GET["stu_no"];
    $sql = "select * from student,major where stu_no='$stu_no' and student.major_id=major.major_id";
    $result = mysqli_query($conn, $sql) or die("数据查询失败");
    $row = mysqli_fetch_assoc($result);
    ?>
    <div id="content">
        <div id="left">
            <p><label>学号：</label><span><?php echo $row["stu_no"] ?></span></p>
            <p><label>姓名：</label><span><?php echo $row["stu_name"] ?></span></p>
            <p><label>专业：</label><span><?php echo $row["major_name"] ?></span></p>
            <p><label>性别： </label><span><?php echo $row["gender"] ?></span></p>
            <p><label>生日：</label><span><?php echo $row["birthdate"] ?></span></P>
            <p><label>电话：</label><span><?php echo $row["telephone"] ?></span></p>
            <p><label>邮箱：</label><span><?php echo $row["email"] ?></span></p>
            
        </div>
        <div id="right">
            <div id="pic">
                <img id="img" src="<?php if (empty($row["photo"])) echo ".\images\head.png";
                                    else  echo $row["photo"] ?>" />
            </div>
        </div>
        <div id="bottom">
        <p>个人简介:</p>
            <?php
            if (empty($row["resume"]))
                echo "尚未填写个人简介";
            else{
                echo $row['resume'];
            }
            ?>
           
        </div>
    </div>
</body>

</html>